//
//  ALPS_ClassifyCollectionItem.m
//  Alps
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ALPS_ClassifyCollectionItem.h"

@implementation ALPS_ClassifyCollectionItem

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.itemLabel = [[UILabel alloc] initWithFrame:self.bounds];
        [self addSubview:_itemLabel];
        _itemLabel.textAlignment = 1;
        _itemLabel.font = [UIFont systemFontOfSize:14];
        _itemLabel.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1.000];
        
        self.itemIcon = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 30, 30)];
        [self addSubview:_itemIcon];
        
    }
    return self;
}

- (void)setModel:(ALPS_ClassifyModel *)model
{
    self.itemLabel.text = model.title;
    [self.itemIcon sd_setImageWithURL:[NSURL URLWithString:model.coverPath]];
}


@end
